home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 41.zip / BS1 part 41 / Devpac 2.12 disk 2.adf / include.cbm / devices / prtbase.i < prev    next >
Text File  |  1987-03-31  |  6KB  |  159 lines

  1. ********************************************************************
  2. *               Commodore-Amiga, Inc.                              *
  3. *               prtbase.i                                          *
  4. ********************************************************************
  5. ********************************************************************
  6. *
  7. *  printer device data definition
  8. *
  9. ********************************************************************
  10.  
  11.    IFND  DEVICES_PRTBASE_I
  12. DEVICES_PRTBASE_I EQU   1
  13.  
  14.    IFND  EXEC_NODES_I
  15.    INCLUDE  "exec/nodes.i"
  16.    ENDC
  17.    IFND  EXEC_LISTS_I
  18.    INCLUDE  "exec/lists.i"
  19.    ENDC
  20.    IFND  EXEC_PORTS_I
  21.    INCLUDE  "exec/ports.i"
  22.    ENDC
  23.    IFND  EXEC_LIBRARIES_I
  24.    INCLUDE  "exec/libraries.i"
  25.    ENDC
  26.    IFND  EXEC_TASKS_I
  27.    INCLUDE  "exec/tasks.i"
  28.    ENDC
  29.  
  30.    IFND  DEVICES_PARALLEL_I
  31.    INCLUDE  "devices/parallel.i"
  32.    ENDC
  33.    IFND  DEVICES_SERIAL_I
  34.    INCLUDE  "devices/serial.i"
  35.    ENDC
  36.    IFND  DEVICES_TIMER_I
  37.    INCLUDE  "devices/timer.i"
  38.    ENDC
  39.    IFND  LIBRARIES_DOSEXTENS_I
  40.    INCLUDE  "libraries/dosextens.i"
  41.    ENDC
  42.    IFND  INTUITION_INTUITION_I
  43.    INCLUDE  "intuition/intuition.i"
  44.    ENDC
  45.  
  46.  
  47.  STRUCTURE  DeviceData,LIB_SIZE
  48.     APTR dd_Segment           ; A0 when initialized
  49.     APTR dd_ExecBase          ; A6 for exec
  50.     APTR dd_CmdVectors        ; command table for device commands
  51.     APTR dd_CmdBytes          ; bytes describing which command queue
  52.     UWORD   dd_NumCommands    ; the number of commands supported
  53.     LABEL   dd_SIZEOF
  54.  
  55.  
  56. *------
  57. *------ device driver private variables ------------------------------
  58. *------
  59. du_Flags EQU   LN_PRI         ; various unit flags
  60.  
  61. ;------ IO_FLAGS
  62.     BITDEF  IO,QUEUED,4       ; command is queued to be performed
  63.     BITDEF  IO,CURRENT,5      ; command is being performed
  64.     BITDEF  IO,SERVICING,6    ; command is being actively performed
  65.     BITDEF  IO,DONE,7         ; command is done
  66.  
  67. ;------ du_Flags
  68.     BITDEF  DU,STOPPED,0      ; commands are not to be performed
  69.  
  70.  
  71. *------ Constants ----------------------------------------------------
  72. P_PRIORITY  EQU         0
  73. P_STKSIZE   EQU         $800
  74.  
  75. *------ pd_Flags ------
  76.    BITDEF   P,IOR0,0          ; IOR0 is in use
  77.    BITDEF   P,IOR1,1          ; IOR1 is in use
  78.    BITDEF   P,EXPUNGED,7      ; device to be expunged when all closed
  79.  
  80.  STRUCTURE  PrinterData,dd_SIZEOF
  81.     STRUCT  pd_Unit,MP_SIZE   ; the one and only unit
  82.     BPTR pd_PrinterSegment    ; the printer specific segment
  83.     UWORD   pd_PrinterType    ; the segment printer type
  84.     APTR pd_SegmentData       ; the segment data structure
  85.     APTR pd_PrintBuf          ; the raster print buffer
  86.     APTR pd_PWrite            ; the parallel write function
  87.     APTR pd_PBothReady        ; the parallel write function's done
  88.  
  89.     IFGT IOEXTPar_SIZE-IOEXTSER_SIZE
  90.     STRUCT  pd_IOR0,IOEXTPar_SIZE   ; port I/O request 0
  91.     STRUCT  pd_IOR1,IOEXTPar_SIZE   ;   and 1 for double buffering
  92.     ENDC
  93.  
  94.     IFLE IOEXTPar_SIZE-IOEXTSER_SIZE
  95.     STRUCT  pd_IOR0,IOEXTSER_SIZE   ; port I/O request 0
  96.     STRUCT  pd_IOR1,IOEXTSER_SIZE   ;   and 1 for double buffering
  97.     ENDC
  98.  
  99.     STRUCT  pd_TIOR,IOTV_SIZE       ; timer I/O request
  100.     STRUCT  pd_IORPort,MP_SIZE      ;   and message reply port
  101.     STRUCT  pd_TC,TC_SIZE           ; write task
  102.     STRUCT  pd_Stk,P_STKSIZE        ;   and stack space
  103.     UBYTE   pd_Flags                ; device flags
  104.     UBYTE   pd_pad
  105.     STRUCT  pd_Preferences,pf_SIZEOF ; the latest preferences
  106.     UBYTE      pd_PWaitEnabled      ; wait function switch
  107.     LABEL   pd_SIZEOF               ; warning! this may be odd
  108.  
  109.     BITDEF  PPC,GFX,0
  110.     BITDEF  PPC,COLOR,1
  111.  
  112. PPC_BWALPHA    EQU   0
  113. PPC_BWGFX      EQU   1
  114. PPC_COLORGFX   EQU   3
  115.  
  116. PCC_BW          EQU     1
  117. PCC_YMC         EQU     2
  118. PCC_YMC_BW      EQU     3
  119. PCC_YMCB        EQU     4
  120.  
  121. PCC_4COLOR      EQU     $4      ; a flag for YMCB and BGRW
  122. PCC_ADDITIVE    EQU     $8
  123. PCC_WB          EQU     $9
  124. PCC_BGR         EQU     $a
  125. PCC_BGR_WB      EQU     $b
  126. PCC_BGRW        EQU     $c
  127.  
  128.  STRUCTURE  PrinterExtendedData,0
  129.     APTR    ped_PrinterName   ; printer name, null terminated
  130.     APTR    ped_Init          ; called after LoadSeg
  131.     APTR    ped_Expunge       ; called before UnLoadSeg
  132.     APTR    ped_Open          ; called at OpenDevice
  133.     APTR    ped_Close         ; called at CloseDevice
  134.     UBYTE   ped_PrinterClass  ; printer class
  135.     UBYTE   ped_ColorClass    ; color class
  136.     UBYTE   ped_MaxColumns    ; number of print columns available
  137.     UBYTE   ped_NumCharSets   ; number of character sets
  138.     UWORD   ped_NumRows       ; number of raster rows in a raster dump
  139.     ULONG   ped_MaxXDots      ; number of dots maximum in a raster dump
  140.     ULONG   ped_MaxYDots      ; number of dots maximum in a raster dump
  141.     UWORD   ped_XDotsInch     ; horizontal dot density
  142.     UWORD   ped_YDotsInch     ; vertical dot density
  143.     APTR    ped_Commands      ; printer text command table
  144.     APTR    ped_DoSpecial     ; special command handler
  145.     APTR    ped_Render        ; raster render function
  146.     LONG    ped_TimeoutSecs   ; good write timeout
  147. ;------ the following only exists if the segment version is 33 or greater
  148.     APTR    ped_8BitChars     ; conversion strings for the extended font
  149.     LABEL   ped_SIZEOF
  150.  
  151.  STRUCTURE  PrinterSegment,0
  152.     ULONG   ps_NextSegment    ; (actually a BPTR)
  153.     ULONG   ps_runAlert       ; MOVEQ #0,D0 : RTS
  154.     UWORD   ps_Version        ; segment version
  155.     UWORD   ps_Revision       ; segment revision
  156.     LABEL   ps_PED            ; printer extended data
  157.  
  158.    ENDC
  159.